#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdlib.h>
void reserve(char* p)
{
	char* start = p;
	char temp = 0;
	while (*p != '\0')
		p++;
	while ((--p) - start >= 1)
	{
		temp = *p;
		*p = *start;
		*start = temp;
		start++;
	}
}

int main()
{
	char arr[10000] = { 0 };
	gets(arr);
	reserve(arr);
	puts(arr);
	return 0;
}